random boolean python

48

python random true false -

bool(random.getrandbits(1)) #is still about twice as fast as random.choice([True, False])

Comments

Submit
0 Comments